package com.yanqu.road.entity.wingroom;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_wingroom_patrons_visit_reward", desc = "厢房门客拜访奖励")
public class CrossUserVisitRewardData extends DataObject {

    @FieldTypeAnnotation(desc = "玩家id", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "拜访结束时间/理论奖励获得时间")
    private int endTime;

    @FieldTypeAnnotation(desc = "奖励")
    private String reward = "";

    @FieldTypeAnnotation(desc = "是否领奖")
    private boolean isGet;

    @FieldTypeAnnotation(desc = "拜访目标")
    private long homeUserId;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getEndTime() {
        return endTime;
    }

    public void setEndTime(int endTime) {
        if(this.endTime != endTime) {
            this.endTime = endTime;
            setUpdateOption();
        }
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        if(!Objects.equals(reward, this.reward)) {
            this.reward = reward;
            setUpdateOption();
        }
    }

    public long getHomeUserId() {
        return homeUserId;
    }

    public void setHomeUserId(long homeUserId) {
        if(this.homeUserId != homeUserId) {
            this.homeUserId = homeUserId;
            setUpdateOption();
        }
    }

    public boolean isGet() {
        return isGet;
    }

    public void setGet(boolean get) {
        if(isGet != get) {
            isGet = get;
            setUpdateOption();
        }
    }
}
